﻿using System;
using Business;
using Obout.Ajax.UI.HTMLEditor.Popups;

public partial class Pages_ImageView : System.Web.UI.Page
{
    // override OnInit to draw the Image
    protected override void OnInit(EventArgs e)
    {
        var imageId = Context.Request.QueryString[MyImageBrowser.ViewParameterName];
        if (!String.IsNullOrEmpty(imageId)) // it is the 'file system' gallery image 
        {
            Page.Response.ContentType = "image/gif";
            Page.Response.BinaryWrite((new MyImageBrowser()).GetImageBytes(int.Parse(imageId)));
            Page.Response.End();
        }
        else
        {
            base.OnInit(e);
        }
    }

}
